<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>分类管理</title>
    <hdjs/>
    <bootstrap/>
    <style type="text/css">
        .plus_minus{
            width: 20px;
        }
    </style>
    <link rel="stylesheet" type="text/css" href="__STATIC__/Css/common.css">
    <css file="__CONTROL_TPL__/css/css.css"/>
    <js file="__CONTROL_TPL__/js/js.js"/>
    <js file="__CONTROL_TPL__/js/kuai.js"/>
    <script type="text/javascript">
        
    </script>
</head>
<body>
<div class="wrap">
    <table class="table2">
        <thead>
        <tr>
            <td width="30"></td>
            <td>分类id</td>
            <td>分类名称</td>
            <td>分类标题</td>
            <td>分类排序</td>
            <td>静态目录</td>
            <td>列表静态</td>
            <td>内容静态</td>
            <td>是否显示</td>
            <td width="200">操作</td>
        </tr>
        </thead>
        <tbody>
            <foreach  from="$data" value="$v">
            
                <tr pid='{$v.pid}' cid='{$v.cid}'>
                     <td width="30">
                    <!-- <span class="btn btn-primary btn-xs plus_minus">+</span> -->
                    <span class="btn btn-success btn-xs plus_minus">+</span>
                    </td>
                    <td>{$v.cid}</td>
                    <td>{$v.cname}</td>
                    <td>{$v.ctitle}</td>
                    <td>{$v.csort}</td>
                    <td>{$v.htmldir}</td>
                    <td>
                        <if value="$v['is_listhtml'] eq 0">
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid' =>$v['cid'] ,'type' => 'list','switch' =>1)}')"></a>
                        <else/>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid' =>$v['cid'] ,'type' => 'list','switch' =>0)}')"></a>
                        </if>
                    </td>
                    <td>
                        <if value="$v['is_archtml'] eq 0">
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'arc','switch'=>1)}')"></a>
                        <else/>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'arc','switch'=>0)}')"></a>
                        </if>
                    </td>
                   <td>
                        <if value="$v['is_show'] eq 0">
                            <a href="javascript:" class="glyphicon glyphicon-remove" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'show','switch'=>1)}')"></a>
                        <else/>
                            <a href="javascript:" class="glyphicon glyphicon-ok" onclick="hd_ajax('{|U:'Category/ajax_update_stat',array('cid'=>$v['cid'],'type'=>'show','switch'=>0)}')"></a>
                        </if>
                    </td>
                    <td width="200">
                        <a href="{|U:'add_son',array('cid'=>$v['cid'])}" class="btn btn-primary btn-sm">添加子分类</a>
                        
                        <a href="{|U:'edit',array('cid'=>$v['cid'])}" class="btn btn-success btn-sm">
                            编辑</a>
                        <a href="javascript:" class="btn btn-danger btn-sm" onclick="if(confirm('确定要删除吗？')) hd_ajax('{|U:'del',array('cid'=>$v['cid'])}')">删除</a>
                     
                    </td>
                </tr>
           </foreach>
        </tbody>
    </table>
    <div class="page_hdjob">
        {$page}
    </div>
</div>

</body>
</html>


